import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import(/*  */'@/views/layout.vue'),
    children: [
      {
        path: '/',
        component: () => import(/*  */'@/views/home/index.vue')
      },
      {
        path: '/qa',
        component: () => import(/*  */'@/views/qa/index.vue')
      },
      {
        path: '/video',
        component: () => import(/*  */'@/views/video/index.vue')
      },
      {
        path: '/my',
        component: () => import(/*  */'@/views/my/index.vue')
      }
    ]
  },
  { path: '/login', component: () => import(/*  */'@/views/login/index.vue') },
  { path: '/search', component: () => import(/*  */'@/views/search/index.vue') },
  { path: '/article/:artId', component: () => import(/*  */'@/views/article/index.vue'), props: true },

  { path: '/user/profile', name:'profile', component: () => import(/*  */'@/views//user-profile/index.vue') }


]

const router = new VueRouter({
  routes
})

export default router
